package com.company.代理模式2.impl;

import com.company.代理模式2.Agent;

public class Dailiduixiang implements Agent{
    private Agent target;

    public Dailiduixiang(Agent target) {
        this.target = target;
    }

    public void setTarget(Agent target) {
        this.target = target;
    }


    @Override
    public void fun() {
        System.out.println("代理商在厂商处购买电脑");
        target.fun();
        System.out.println("代理商再将电脑以11000的价格出售给用户");
    }
}
